<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- <input type="text" v-focus> -->
        <input type="button" v-focus value="asdf" onclick="a">
        <div v-test:msg.a.b="message"></div>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        function a (){
            alert('1')
        }

        Vue.directive('test',{
            bind: function(el, binding, vnode){
                var keys = [];
                for(let i in vnode){
                    keys.push(i);
                }
                el.innerHTML = 
                'name: ' + binding.name + '<br/>' + 
                'value:'    + binding.value + '<br/>' +
                'expression: ' + binding.expression + '<br/>' +
                'argument:' + binding.arg + '<br/>' +
                'modifiers:' + JSON.stringify(binding.modifiers) + '<br/>' +
                'vnode keys: '  + keys.join(', ')
            }
        });

        Vue.directive('focus',{
            inserted: function(el){
                el.focus()
            }
        })
        
        let app = new Vue({
            el: '#app'
            ,
            data(){
                return {
                    message: 'some text'
                }
            }
        })
    </script>
</body>
</html>